<!--{include index/header}-->
<script type="text/javascript">
	$(function(){
		$('#settings-form').submit(function(){
			$.ajax({
				type:'POST',
				url:'{$DOMAIN_ROOT}index.php/member/settings',
				data:$(this).serialize(),
				dataType:'html',
				success:function(res){
					if(res == '1') right('成功了！您的账户设置已更新成功了！',function(){
						this.location.href="{$DOMAIN_ROOT}index.php/member/settings"
					});
				}				
			});
		});		
	});
</script>
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="settings">
	<!--{include member/menu}-->
    <div id="content" class="clear settings-box">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head"><h2>帐户设置</h2></div>
                <div class="sect">
                    <form id="settings-form" method="post" action="javascript:;" class="validator">
                    	<input type="hidden" name="uid" value="{$info['id']}"/>
						<div class="wholetip clear"><h3>1、基本信息</h3></div>
                        <div class="field email">
                            <label>Email</label>
                            <input size="30" name="email" id="settings-email-address" class="f-input readonly" readonly="readonly" value="{$info['email']}" type="text">
                        </div>
                        <div class="field username">
                            <label>用户名</label>
                            <input size="30" name="username" id="settings-username" class="f-input" value="{$info['username']}" require="true" datatype="limit" min="2" max="16" maxlength="16" type="text">
                        </div>
                        <div class="field password">
                            <label>新密码</label>
                            <input size="30" name="password" id="settings-password" class="f-input" type="password">
                            <span class="hint">如果不想修改密码，请保持空白</span>
                        </div>
                        <div class="field password">
                            <label>确认新密码</label>
                            <input size="30" name="password2" id="settings-password-confirm" class="f-input" type="password">
                        </div>
                        <div class="field password">
                            <label>性别</label>
							<select name="gender" class="f-city">
								<option value="0" <!--{if $info['gender'] == 0}-->selected="selected"<!--{/if}-->>男</option>
								<option value="1" <!--{if $info['gender'] == 1}-->selected="selected"<!--{/if}-->>女</option>
							</select>
                        </div>
						<div class="wholetip clear"><h3>2、联系信息</h3></div>
                        <div class="field mobile">
                            <label>手机号</label>
                            <input size="30" name="mobile" id="settings-mobile" class="number" value="{$info['mobile']}" type="text"><span class="inputtip">手机号码是我们联系你的最重要的联系方式</span>
                        </div>
                        <div class="field password">
                            <label>QQ</label>
                            <input size="30" name="qq" id="settings-qq" class="number" value="{$info['qq']}" type="text">
                        </div>
						<div class="field city" style="display: none;">
                            <label>所在城市</label>
							<select name="city_id" class="f-city"><option value="14" selected="selected">全国</option><option value="2">北京</option><option value="0">其他</option></select>
                        </div>
						<div class="wholetip clear"><h3>3、派送信息</h3></div>
                        <div class="field" >
                            <p style="padding-left:30px;">{$info['add_name']}，{$info['add_mobile']}，{$info['add_detail']}，{$info['add_code']}</p>
							<span class="hint">如果修改默认地址，可从<a href="{$DOMAIN_ROOT}index.php/member/address">地址管理</a>中设置。</span>
                        </div>
                        <div class="clear"></div>
                        <div class="act">
                            <input value="更改" name="commit" id="settings-submit" class="formbutton" type="submit">
                        </div>
                    </form>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
    <!--{include member/credit_sidebar}-->
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<!--{include index/footer}-->
